using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.FIM
{
    using System;
    using System.Collections.Generic;

    [Table("fim_cheques"), DataContract]
    public class Cheque
    {

		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "ChequeId", ResourceType = typeof(Resources.ChequesResource))]
        [Column("cheque_seq")]
        public int ChequeId { get; set; }

		[ForeignKey("ChequeBook")]
        [DataMember, Display(Name = "ChequeBookId", ResourceType = typeof(Resources.ChequesResource))]
        [Column("cheque_book_seq")]
        public int ChequeBookId { get; set; }

        [DataMember, Display(Name = "ChequeNo", ResourceType = typeof(Resources.ChequesResource))]
        [Column("cheque_no")]
        public int ChequeNo { get; set; }

        [ForeignKey("MasBankAccount")]
        [DataMember, Display(Name = "BankAccId", ResourceType = typeof(Resources.ChequesResource))]
        [Column("bank_acc_seq")]
        public Nullable<int> BankAccId { get; set; }

        [DataMember]
        [Column("print_date")]
        public DateTime? PrintDate { get; set; }

        [DataMember, Display(Name = "PayDate", ResourceType = typeof(Resources.ChequesResource))]
        [Column("pay_date")]
        public DateTime? PayDate { get; set; }

        [DataMember, Display(Name = "PayDate", ResourceType = typeof(Resources.ChequesResource))]
        [Column("cheque_date")]
        public DateTime? ChequeDate { get; set; }

        [DataMember, Display(Name = "PayDate", ResourceType = typeof(Resources.ChequesResource))]
        [Column("actual_pay_date")]
        public DateTime? ActualPayDate { get; set; }

        [DataMember, Display(Name = "Receiver", ResourceType = typeof(Resources.ChequesResource))]
        [Column("receiver")]
        public string Receiver { get; set; }

        [DataMember, Display(Name = "Remarks", ResourceType = typeof(Resources.ChequesResource))]
        [Column("remarks")]
        public string Remarks { get; set; }

        [DataMember, Display(Name = "ChequeStatus", ResourceType = typeof(Resources.ChequesResource))]
        [Column("cheque_status")]
        public string ChequeStatus { get; set; }

        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.ChequesResource))]
        [Column("record_status")]
        public string RecordStatus { get; set; }

        [DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.ChequesResource))]
        [Column("created_by")]
        public Nullable<int> CreatedBy { get; set; }

        [DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.ChequesResource))]
        [Column("created_when")]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

        [DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.ChequesResource))]
        [Column("updated_by")]
        public Nullable<int> UpdatedBy { get; set; }

        [DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.ChequesResource))]
        [Column("updated_when")]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

		public virtual FIM.ChequeBook ChequeBook { get; set; }

        public virtual FIM.MasBankAccount MasBankAccount { get; set; }

    }
}